:root {
            --primary-color: #0d6efd;
            --secondary-color: #6c757d;
            --light-bg: #f8f9fa;
            --border-color: #dee2e6;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: var(--light-bg);
            padding-top: 80px;
        }
        main{
            margin-top: 40px;
        }
        .page-header {
            background: linear-gradient(135deg, var(--primary-color), #4a90e2);
            color: white;
            padding: 5rem 0;
            position: relative;
            overflow: hidden;
        }
        
        .page-header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100" opacity="0.1"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
            opacity: 0.1;
        }
        
        .semester-section {
            margin-bottom: 2rem;
        }
        
        .semester-card {
            border: none;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            margin-bottom: 1.5rem;
        }
        
        .semester-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
        }
        
        .semester-header {
            background: linear-gradient(135deg, var(--primary-color), #4a90e2);
            color: white;
            border-radius: 10px 10px 0 0 !important;
            padding: 1rem 1.5rem;
        }
        
        .semester-title {
            font-size: 1.5rem;
            font-weight: 600;
            margin: 0;
        }
        
        .subject-list {
            list-style-type: none;
            padding: 0;
            margin: 0;
        }
        
        .subject-item {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            transition: background-color 0.2s;
            flex-wrap: wrap;
        }
        
        .subject-item:last-child {
            border-bottom: none;
        }
        
        .subject-item:hover {
            background-color: rgba(0, 0, 0, 0.03);
        }
        
        .subject-icon {
            color: var(--primary-color);
            margin-right: 10px;
            font-size: 1.1rem;
            flex-shrink: 0;
        }
        
        .download-btn {
            margin-left: auto;
            padding: 0.25rem 0.75rem;
            font-size: 0.875rem;
        }
        
        .year-section {
            margin-bottom: 3rem;
        }
        
        .year-title {
            font-size: 1.75rem;
            font-weight: 700;
            color: var(--primary-color);
            margin-bottom: 1.5rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid var(--primary-color);
        }
        
        .search-box {
            max-width: 500px;
            margin: 0 auto 2rem;
        }
        
        .filter-btn.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        
        .back-to-top {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background-color: var(--primary-color);
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            z-index: 1000;
            opacity: 0;
            transition: opacity 0.3s;
        }
        
        .back-to-top.visible {
            opacity: 1;
        }
        
        .department-badge {
            font-size: 0.75rem;
            margin-left: 10px;
        }
        
        .no-results {
            text-align: center;
            padding: 2rem;
            color: var(--secondary-color);
        }
        
        .material-type-badge {
            font-size: 0.7rem;
            margin-left: 8px;
        }
        
        .material-actions {
            display: flex;
            gap: 5px;
            margin-left: auto;
            flex-wrap: wrap;
            justify-content: flex-end;
        }
        
        /* Mobile-specific improvements */
        @media (max-width: 768px) {
            body {
                padding-top: 70px;
            }
            
            .page-header {
                padding: 1.5rem 0;
            }
            
            .page-header h1 {
                font-size: 1.75rem;
            }
            
            .semester-title {
                font-size: 1.25rem;
            }
            
            .filter-buttons {
                overflow-x: auto;
                flex-wrap: nowrap;
                padding-bottom: 10px;
                margin-bottom: 1rem;
            }
            
            .filter-buttons .btn {
                white-space: nowrap;
                font-size: 0.875rem;
                padding: 0.375rem 0.75rem;
            }
            
            .semester-filter-buttons {
                overflow-x: auto;
                flex-wrap: nowrap;
                padding-bottom: 10px;
            }
            
            .semester-filter-buttons .btn {
                white-space: nowrap;
                font-size: 0.875rem;
                padding: 0.375rem 0.75rem;
            }
            
            .subject-item {
                flex-direction: column;
                align-items: flex-start;
                padding: 1rem;
            }
            
            .subject-info {
                display: flex;
                align-items: center;
                margin-bottom: 0.5rem;
                width: 100%;
            }
            
            .subject-text {
                flex-grow: 1;
                margin-right: 10px;
            }
            
            .material-actions {
                margin-left: 0;
                width: 100%;
                justify-content: flex-start;
            }
            
            .material-actions .btn {
                font-size: 0.8rem;
                padding: 0.25rem 0.5rem;
            }
            
            .badges-container {
                display: flex;
                flex-wrap: wrap;
                gap: 5px;
                margin-top: 0.5rem;
                width: 100%;
            }
            
            .department-badge, .material-type-badge {
                margin-left: 0;
            }
            
            .year-title {
                font-size: 1.5rem;
            }
        }
        
        @media (max-width: 576px) {
            .page-header h1 {
                font-size: 1.5rem;
            }
            
            .page-header .lead {
                font-size: 1rem;
            }
            
            .search-box {
                margin-bottom: 1rem;
            }
            
            .year-title {
                font-size: 1.25rem;
            }
        }
        
        /* Filter section improvements */
        .filter-section {
            background-color: white;
            padding: 1.5rem 0;
            border-bottom: 1px solid var(--border-color);
        }
        
        /* Make filter scrollable on mobile */
        .filter-scroll-container {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }
        
        .filter-scroll-content {
            display: flex;
            flex-wrap: nowrap;
            min-width: max-content;
        }
        
        /* Loading indicator */
        .loading-indicator {
            display: none;
            text-align: center;
            padding: 2rem;
        }
        
        .loading-spinner {
            width: 3rem;
            height: 3rem;
            border: 0.3rem solid #f3f3f3;
            border-top: 0.3rem solid var(--primary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 1rem;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }